package com.fan.config;

import com.fan.aspect.SignAspect;
import com.fan.config.filters.RequestCachingFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author D-BJ-144
 * @description FilterConfig 注册过滤器
 * @Date 2025/2/14 16
 */
@Configuration
public class FilterConfig {

    /*@Bean
    public RequestCachingFilter requestCachingFilter() {
        return new RequestCachingFilter();
    }*/

   /* @Bean
    public SignAspect signAspect() {
        return new SignAspect();
    }*/

    @Bean
    public FilterRegistrationBean<RequestCachingFilter> requestCachingFilterRegistration(
            RequestCachingFilter requestCachingFilter) {
        FilterRegistrationBean<RequestCachingFilter> bean = new FilterRegistrationBean<>(requestCachingFilter);
        bean.setOrder(1);
        return bean;
    }
}
